<?php

/**
 * @version February 8, 2011
 * @Author Brice
 * This is the control file.
 * It acts as the medium between the viewCategory.php file,
 * and the dbCategory.php file.
 */

class Category {

    //these private variables are only accessible in this class,
    //we have to use functions or other methods to use them
    //this file is called in viewCategory.php
    private $categoryID;
    private $categoryName;

    function __construct($z) {
        $this->categoryID = null;
        $this->categoryName = $z;
    }

    function setCategoryID($categoryID) {
        $this->categoryID = $categoryID;
    }

    function getCategoryID() {
        return $this->categoryID;
    }

   /*
    * Sets the category
    */
    function setCategoryName($categoryName) {
        $this->categoryName = $categoryName;
    }

    /*
     * Gets the category
     */
    function getCategoryName() {
        return $this->categoryName;
    }

    function printAllAttributes() {
        $output = sprintf("Category: %s.", $this->categoryName);
        return $output;
    }


}

?>

